↳ Prolog
↳ PrologToPiTRSProof
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
PALINDROME_IN_G(L) → U1_G(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
PALINDROME_IN_G(L) → HALVES_IN_GAAA(L, X1s, X2s, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → LAST_IN_GAA(.(Y, Xs), R, Rests)
LAST_IN_GAA(.(H, T), X, .(H, M)) → U8_GAA(H, T, X, M, last_in_gaa(T, X, M))
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_G(L, X1s, X2s, eq_in_gg(EvenOdd, even))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, even)
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_G(L, eq_in_gg(X1s, X2s))
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → EQ_IN_GG(X1s, X2s)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_G(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, odd)
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_G(L, last_in_gag(X1s, X, X2s))
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → LAST_IN_GAG(X1s, X, X2s)
LAST_IN_GAG(.(H, T), X, .(H, M)) → U8_GAG(H, T, X, M, last_in_gag(T, X, M))
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
PALINDROME_IN_G(L) → U1_G(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
PALINDROME_IN_G(L) → HALVES_IN_GAAA(L, X1s, X2s, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → LAST_IN_GAA(.(Y, Xs), R, Rests)
LAST_IN_GAA(.(H, T), X, .(H, M)) → U8_GAA(H, T, X, M, last_in_gaa(T, X, M))
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_G(L, X1s, X2s, eq_in_gg(EvenOdd, even))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, even)
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_G(L, eq_in_gg(X1s, X2s))
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → EQ_IN_GG(X1s, X2s)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_G(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, odd)
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_G(L, last_in_gag(X1s, X, X2s))
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → LAST_IN_GAG(X1s, X, X2s)
LAST_IN_GAG(.(H, T), X, .(H, M)) → U8_GAG(H, T, X, M, last_in_gag(T, X, M))
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
LAST_IN_GAG(.(H, T), .(H, M)) → LAST_IN_GAG(T, M)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
LAST_IN_GAA(.(H, T)) → LAST_IN_GAA(T)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X, X2s)) → palindrome_out_g(L)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ RuleRemovalProof
HALVES_IN_GAAA(.(T, .(Y, Xs))) → U6_GAAA(T, last_in_gaa(.(Y, Xs)))
U6_GAAA(T, last_out_gaa(R, Rests)) → HALVES_IN_GAAA(Rests)
last_in_gaa(.(T, [])) → last_out_gaa(T, [])
last_in_gaa(.(H, T)) → U8_gaa(H, last_in_gaa(T))
U8_gaa(H, last_out_gaa(X, M)) → last_out_gaa(X, .(H, M))
last_in_gaa(x0)
U8_gaa(x0, x1)
HALVES_IN_GAAA(.(T, .(Y, Xs))) → U6_GAAA(T, last_in_gaa(.(Y, Xs)))
U6_GAAA(T, last_out_gaa(R, Rests)) → HALVES_IN_GAAA(Rests)
last_in_gaa(.(T, [])) → last_out_gaa(T, [])
last_in_gaa(.(H, T)) → U8_gaa(H, last_in_gaa(T))
U8_gaa(H, last_out_gaa(X, M)) → last_out_gaa(X, .(H, M))
POL(.(x1, x2)) = 2 + 2·x1 + 2·x2
POL(HALVES_IN_GAAA(x1)) = 1 + 2·x1
POL(U6_GAAA(x1, x2)) = 2 + 2·x1 + 2·x2
POL(U8_gaa(x1, x2)) = 1 + 2·x1 + 2·x2
POL([]) = 1
POL(last_in_gaa(x1)) = 2·x1
POL(last_out_gaa(x1, x2)) = 2 + x1 + x2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ RuleRemovalProof
↳ QDP
↳ PisEmptyProof
last_in_gaa(x0)
U8_gaa(x0, x1)